home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
U-Utilities
/
(c)u3.d64
/
block modifier.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-11
|
4KB
|
113 lines
1 REM"*** [194]LOCK MODIFIER ***
2 [143]"*** ***
3 REM"*** BY [208]AUL [203]ELLAM ***
4 [143]"*** 105 (null)UTELA LEFT$EIGHTS (null)D. ***
5 REM"*** [194]RANTFORD, [207]NTARIO. ***
6 [143]"*** (null)3(null) 1ATN4 ***
7 REM"*** [202]ULY 10,1983 ***
8 [143]"*** ***
10 DIM C(255),C$(255),AS$(255),HX$(15)
30 FOR A=0 TO 15:READ HX$(A):NEXT
50 POKE53281,15:POKE53280,6
97 REM"*** ***
98 [143]"*** (null)ENU ***
99 REM"*** ***
100 [153][199](14)[199](8)"LOADPOKE PEEKLOCK MODIFICATION PROGRAM. "
101 [153]" FREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFREFRE"
105 [153]" PRINT#PEEKY (null)AUL (null)ELLAM"
110 [153]" 1POKE (null)EAD BLOCK FROM DISK"
120 [153]" 2POKE STR$ISPLAY FIRST HALF OF BLOCK"
130 [153]" 3POKE STR$ISPLAY SECOND HALF OF BLOCK"
140 [153]" 4POKE (null)ODIFY A BYTE"
150 [153]" 5POKE (null)RITE BLOCK TO DISK"
155 [153]" 6POKE (null)EAD NEXT BLOCK FROM DISK"
160 [153]" 7POKE (null)UIT"
170 [153]" VALNTER CHOICE.POKE"
180 [146]198,1:[161]CH$:[139][197](CH$)[179]1[176][197](CH$)[177]7 [167] 180
190 CH[178][197](CH$)
200 [145] CH [137] 1000,2000,3000,4000,5000,1200,6000
997 [143]"*** ***
998 REM"*** [210]EAD BLOCK FROM DISK ***
999 [143]"*** ***
1000 INPUT"[147][212]RACK # 18[157][157][157][157]";T
1010 INPUT"[211]ECTOR # 1[157][157][157]";S
1020 PRINT"[208]LEASE WAIT..."
1030 OPEN 15,8,15
1040 OPEN 2,8,2,"#"
1042 PRINT#15,"U1:2,0";T;S
1043 INPUT#15,EN,EM$,ET,ES
1044 IFEN>0THENCLOSE2:CLOSE15:PRINT"[197]RROR: "EM$:PRINT"[151][208]RESS A KEY.":WAIT198,1:POKE198,0:RETURN
1045 PRINT#15,"B-P:2,0"
1060 FOR L=0 TO 255
1070 GET#2,C$(L):IF C$(L)=""THENC$(L)=CHR$(0)
1080 C(L)=ASC(C$(L)):GOSUB 8000:NEXT
1090 CLOSE2:CLOSE15
1100 GOTO 100
1197 REM"*** ***
1198 [143]"*** (null)EAD NEXT BLOCK ***
1199 REM"*** ***
1200 [153]"LOAD";:[139] C(0)[178]0 [176] C(0)[177]35 [176] C(1)[177]20 [167] 1000
1210 T[178]C(0):S[178]C(1):[137]1020
1997 [143]"*** ***
1998 REM"*** [196]ISPLAY FIRST HALF ***
1999 [143]"*** ***
2000 FB=0
2097 REM"*** ***
2098 [143]"*** STR$ISPLAY ON SCREEN ***
2099 REM"*** ***
2100 [153]"LOADPEEKLOCK DATA :"
2110 [129]A[178]0[164]15:[153]""HX$(FB[173]16[170][181](A[173]2))HX$(8[172](A[171]2[172][181](A[173]2)))"POKE";:C$[178]"":[129]B[178]0[164]7
2120 N[178]FB[170]8[172]A[170]B
2130 [139] (C(N)[177]31[175]C(N)[179]129) [176] (C(N)[177]159)[167]2150
2140 C$[178]C$[170]" ":[137]2160
2150 C$[178]C$[170]C$(N)
2160 [153]" ";AS$(N);:[130]
2170 [153]" -";C$:[130]
2200 [153]"VERIFY(null)RESS ANY KEY TO RETURN TO MENU."
2250 [146] 198,1:[161]B$:[137] 100
2997 [143]"*** ***
2998 REM"*** [196]ISPLAY SECOND HALF ***
2999 [143]"*** ***
3000 FB=128:GOTO2100
3997 REM"*** ***
3998 [143]"*** (null)ODIFY A BYTE ***
3999 REM"*** ***
4000 [133]"LOADPEEKYTE # (IN HEX) 00CMDCMDCMDCMD";BY$
4010 [139] [195](BY$)[179][177]2 [167] 4000
4020 F1[178]0:F2[178]0:L[178]0:[129] B[178]0 [164] 15
4030 [139] [200](BY$,1)[178]HX$(B)[167] L[178]L[170]16[172]B:F1[178]1
4040 [139] [201](BY$,1)[178]HX$(B)[167] L[178]L[170]B:F2[178]1
4050 [130]:[139] F1[178]0 [176] F2[178]0 [167] 4000
4060 [153]"(null)REVIOUS CONTENTS : POKE";AS$(L)
4070 [133]"(null)EW CONTENTS : 00CMDCMDCMDCMD";AS$(L)
4075 [139] [195](AS$(L))[179][177]2 [167] [153]"ONONON";:[137] 4070
4080 F1[178]0:F2[178]0:C(L)[178]0:[129] B[178]0 [164] 15
4090 [139] [200](AS$(L),1)[178]HX$(B)[167] C(L)[178]C(L)[170]16[172]B:F1[178]1
4100 [139] [201](AS$(L),1)[178]HX$(B)[167] C(L)[178]C(L)[170]B:F2[178]1
4110 [130]:[139] F1[178]0 [176] F2[178]0 [167] [153]"ONONON";:[137] 4070
4120 C$(L)[178][199](C(L)):[137] 100
4997 [143]"*** ***
4998 REM"*** [215]RITE BLOCK TO DISK ***
4999 [143]"*** ***
5000 IF T=0 THEN 100
5010 PRINT"[147][208]LEASE WAIT..."
5020 OPEN 15,8,15
5030 OPEN 2,8,2,"#
5040 [152]15,"B-P:2,0"
5080 [129] L[178]0 [164] 255
5090 [152]2,C$(L);:[130]
5095 [152]15,"U2:2,0";T;S
5100 [160]2:[160]15:[137]100
5997 [143]"*** ***
5998 REM"*** [197]ND ***
5999 [143]"*** ***
6000 PRINT"[147]"CHR$(9):END
7997 REM"*** ***
7998 [143]"*** LENONVERT DECI TO HEX ***
7999 REM"*** ***
8000 AS$(L)[178]HX$([181](C(L)[173]16))[170]HX$(C(L)[171]16[172][181](C(L)[173]16)):[142]
8997 [143]"*** ***
8998 REM"*** [200]EX CHARACTERS ***
8999 [143]"*** ***
9000 DATA 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F